<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://www.springframework.org/security/tags" prefix="security" %>
<!-- 修改保存的按钮 -->
<c:set var="EDIT_SAVE_BUTTON" value="${CODE_AUTH.user_edit_button}"></c:set>
<!-- 是否有修改保存的权限 -->						
<security:authorize var="HAS_AUTH_EDIT_SAVE" access="${EDIT_SAVE_BUTTON.SPEL}"></security:authorize>	
<!DOCTYPE html>
<html lang="zh-CN">
<!-- 引入头部 -->
<%@include file="/WEB-INF/include-head.jsp"%>
<body>
	<!-- 引入导航条 -->
	<%@include file="/WEB-INF/include-nav.jsp"%>
	<div class="container-fluid">
		<div class="row">
			<!-- 引入侧边栏 -->
			<%@include file="/WEB-INF/include-sidebar.jsp"%>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
				<ol class="breadcrumb">
					<li><a href="admin/to/main/page.html">首页</a></li>
					<li><a href="admin/get/page.html">数据列表</a></li>
					<li class="active">修改</li>
				</ol>
				<div class="panel panel-default">
					<div class="panel-heading">
						表单数据
						<div style="float: right; cursor: pointer;" data-toggle="modal"
							data-target="#myModal">
							<i class="glyphicon glyphicon-question-sign"></i>
						</div>
					</div>
					<div class="panel-body">
						<form action="${EDIT_SAVE_BUTTON.URL }" method="post" role="form">
							<!-- csrf隐藏域 -->
							<input type="hidden" name="${_csrf.parameterName }" value="${_csrf.token }"/>
			
							<!-- 隐藏域 -->
							<input type="hidden" name="id" value="${admin.id }"/>
							<input type="hidden" name="pageNum" value="${param.pageNum }"/>
							<input type="hidden" name="keyword" value="${param.keyword }"/>
							<p class="text-danger">${requestScope.exception.message }</p>
							<div class="form-group">
								<label for="exampleInputPassword1">登录账号</label> 
								<input
									name="loginAcct"
									value="${admin.loginAcct }"
									type="text" class="form-control" id="exampleInputPassword1"
									placeholder="请输入登录账号">
							</div>
							<div class="form-group">
								<label for="exampleInputPassword1">用户昵称</label> 
								<input
									name="userName"
									value="${admin.userName }"
									type="text" class="form-control" id="exampleInputPassword1"
									placeholder="请输入用户昵称">
							</div>
							<div class="form-group">
								<label for="exampleInputEmail1">邮箱地址</label> 
								<input
									name="email" 
									value="${admin.email }"
									type="email"
									class="form-control" id="exampleInputEmail1"
									placeholder="请输入邮箱地址">
								<p class="help-block label label-warning">请输入合法的邮箱地址, 格式为：
									xxxx@xxxx.com</p>
							</div>
							
							<security:authorize access="${HAS_AUTH_EDIT_SAVE }">
								<button type="submit" class="${EDIT_SAVE_BUTTON.BUTTON_CLASS }">
									<i class="${EDIT_SAVE_BUTTON.ICON_CLASS }"></i> 修改
								</button>
							</security:authorize>
							
							<button type="reset" class="btn btn-danger">
								<i class="glyphicon glyphicon-refresh"></i> 重置
							</button>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>